package com.vecspace.constant;

public class DBType {
    public final static String MSSQL = "mssql";
    public final static String ORACLE = "oracle";
    public final static String POSTGRE = "postgre";
    public final static String MYSQL = "mysql";
    public final static String SQLITE = "sqlite";
    public final static String DERBY = "derby";

    private static String ACTIVE_DB = POSTGRE;

    public static String getActiveDB() {
        return ACTIVE_DB;
    }

    public static void setActiveDB(String activeDB) {
        ACTIVE_DB = activeDB;
    }

    public static boolean isMySQLOfCurrent() {
        return MYSQL.equalsIgnoreCase(ACTIVE_DB);
    }

    public static boolean isOracleOfCurrent() {
        return ORACLE.equalsIgnoreCase(ACTIVE_DB);
    }

    public static boolean isMSSQLOfCurrent() {
        return MSSQL.equalsIgnoreCase(ACTIVE_DB);
    }

    public static boolean isPostgreSQLOfCurrent() {
        return POSTGRE.equalsIgnoreCase(ACTIVE_DB);
    }

    public static boolean isSqliteOfCurrent() {
        return SQLITE.equalsIgnoreCase(ACTIVE_DB);
    }

    public static boolean isDerbyOfCurrent() {
        return DERBY.equalsIgnoreCase(ACTIVE_DB);
    }
}
